this.view = {extend: 'iframe'}

this.handler = function(){
  
  var user = request.attr("user"), xhr = request.attr("xhr"), previewAnchorForm = forms.previewAnchor();
  
  this.get = function(){
  	$("body").html("<h3>Previewing \"" + request.params.href  + "\"</h3>");
    var caption= "", title = "";
    $("p", xhr).each(function(i){
    	var buf = $(this).text();
    	if(buf.length > 120) {;
    	  caption = buf;
    	  return false;
    	} else if(buf.length > caption.length){
    		caption = buf;
    	}
    });
    title = $("title", xhr).text()  
   	$("body").append("<div class=preview-link-request><h4>" + title + "</h4><p>" + caption + "</p><p><a href='" + request.params.href + "'>view more</a></p></div>");
   	previewAnchorForm.errorMessage && $("body").append('<p>' + previewAnchorForm.errorMessage + '</p>');
   	$("body").append(previewAnchorForm.html());
   	
   	!previewAnchorForm.data.title && $("#previewAnchor_title").val(title);
   	!previewAnchorForm.data.caption && $("#previewAnchor_caption").text(caption);
  }
  
  this.post = function(){
  	this.get();
  }
}